#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
   double x;
   double ret = 1;
   int n;
   cin >> x >> n;
   double sum = 1;
   while(n--)
   {
   	 ret*=x;
   	 sum+=ret;
   }
   printf("%.2f",sum);
   
   		
}

